#include "ti_msp_dl_config.h"
#include "FIndLine.h"

int Find_Left1()
{
    if(DL_GPIO_readPins(FInd_Line_PORT,FInd_Line_Left_1_PIN))
        return 1;
    return 0;
}
int Find_Left2()
{
    if(DL_GPIO_readPins(FInd_Line_PORT,FInd_Line_Left_2_PIN))
        return 1;
    return 0;
}
int Find_Right1()
{
    if(DL_GPIO_readPins(FInd_Line_PORT,FInd_Line_Right_1_PIN))
        return 1;
    return 0;
}
int Find_Right2()
{
    if(DL_GPIO_readPins(FInd_Line_PORT,FInd_Line_Right_2_PIN))
        return 1;
    return 0;
}

//开始寻迹返回0
int Find_Start()
{
    return Find_Left1()&Find_Left2()&Find_Right1()&Find_Right2();
}

//结束寻迹返回0
int Find_End()
{
    if(Find_Left1()!=0 
        && Find_Left2()!=0
        && Find_Right1()!=0
        && Find_Right2()!=0)
        return 0;
    return 1;
}